package com.wuseguang.springcloud.controller;


import com.wuseguang.springcloud.Filter.RequestParameterWrapper;
import com.wuseguang.springcloud.service.TeacherChatService;
import com.wuseguang.springcloud.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author zm
 * @Description 教师留言
 * @Date 2020/9/14 11:32
 */
@RestController
@RequestMapping("/jurisdiction")
public class TeacherChatController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private TeacherChatService teacherChatService;


    @RequestMapping("/queryStudentList")
    public Result queryStudentList(RequestParameterWrapper request,
                                   @RequestParam(value = "classId") Integer classId) {

        logger.info("查询 TeacherChatControlle -> queryStudentList");
        //获取学校id
        String schoolId = request.getParam("schoolId");
        String teacherId = request.getParam("teacherId");
        return teacherChatService.queryStudentList(schoolId, teacherId, classId);
    }
}
